class AddRankIndex < ActiveRecord::Migration
  def self.up
    add_index :asin_infos,:sales_rank
    add_index :asin_infos,:total_reviews_rank
    add_index :asin_infos,:average_rating_rank
    add_index :asin_infos,:price_rank
    add_index :asin_infos,:number_ofpages_rank
    add_index :asin_infos,:publication_date_rank
    add_index :asin_infos,:author_id
    add_index :asin_infos,:publisher_id
    add_index :asin_infos,:id
    add_index :authors,:id
    add_index :publishers,:id
  end

  def self.down
    remove_index :asin_infos,:title_rank
    remove_index :asin_infos,:sales_rank
    remove_index :asin_infos,:total_reviews_rank
    remove_index :asin_infos,:average_rating_rank
    remove_index :asin_infos,:price_rank
    remove_index :asin_infos,:number_ofpages_rank
    remove_index :asin_infos,:publication_date_rank
    remove_index :asin_infos,:author_id
    remove_index :asin_infos,:publisher_id
    remove_index :asin_infos,:id
    remove_index :authors,:id
    remove_index :publishers,:id
  end
end
